package com.sdgakj.foton.cloud.controller;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.sdgakj.foton.cloud.bean.Province;
import com.sdgakj.foton.cloud.service.IProvinceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: Du Ronghong
 * @Description:
 * @Date: Created in 14:48 2018/7/12
 * @Modified By:
 */
@RestController
@RequestMapping(value = "/api/v1/province")
public class ProvinceController {

    @Autowired
    private IProvinceService provinceService;

    @RequestMapping(value = "/list",method = RequestMethod.GET)
    public List<Province> getAll(){
        return provinceService.selectList(new EntityWrapper<Province>());
    }
}
